package edu.pku.sei.transformation.atl.adapter;

import edu.pku.sei.transformation.editor.model.RuleInvoke;
import edu.pku.sei.transformation.editor.model.TypedModel;

public class ATLPreRuleInvokeExpression extends ATLInvokeExpression {

	RuleInvoke ruleInvoke = null;
	TypedModel target = null;
	String input = null;
	String output = null;
	String outputName = null;

	public ATLPreRuleInvokeExpression(RuleInvoke invoke, TypedModel target)
			throws Exception {
		super(invoke, target);
		if (invoke.getInvokeType() != invoke.RULE_PRECONDITION) {
			throw new Exception("invoke type not match");
		}
	}

	@Override
	public String getContent() {
		return output + " <- thisModule.resolveTemp(" + input + ",\""
				+ outputName + "\"" + ")";
	}

}
